<?php $this->load->view('layout/jingqu/header');?>
<div class="order-page screen-width clearfix">
    <div class="order-left">
        <?php $this->load->view('layout/account_left');?>
    </div>
    <div class="order-right">
        <div class="your-choice">
            <h5>用户银行卡列表</h5>
            <div class="sale-search">
            	<div class="bank-list">
            		<?php if ($userBank->num_rows() > 0) : ?>
					<table class="table">
						<tbody>
							<?php foreach ($userBank->result() as $value) : ?>
							<tr>
								<td class="ban-name">
									<img src="skins/images/bank68/bank-<?php echo $value->bank_id?>.png">
									<p><?php echo $value->bank_name, ' **', substr($value->bank_card, -4, 4); ?></p>
								</td>
								<td class="ban-quick">储蓄卡 | 快捷</td>
								<td class="ban-limit">限额50000/次</td>
								<td class="ban-mba">
									<a href="<?php echo site_url('userBank/details/'. $value->user_bank_id); ?>">管理</a>
									<span>|</span>
									<a href="<?php echo base_url('userBank/delete/'. $value->user_bank_id); ?>" onclick="return confirm('确定删除该银行卡?')">删除</a>
								</td>
								<?php if ($value->is_default == 1) : ?>
									<td class="ban-think think">
										<a href="javascript:;">默认支付</a>
									</td>
								<?php else : ?>
									<td class="ban-think">
										<a href="<?php echo base_url('userBank/setDefault/'. $value->user_bank_id); ?>" onclick="return confirm('确定将该银行卡设为默认?')">设为默认</a>
									</td>
								<?php endif; ?>
							</tr>
							<?php endforeach; ?>
						</tbody>
					</table>
					<?php endif; ?>
					<a href="<?php echo site_url('userBank/bankAdd') ?>" class="ban-add">
						<div class="add-brank">
							<i>+</i>
							<p>添加银行卡</p>
						</div>
					</a>
				</div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('layout/jingqu/footer');?>